import axios from 'axios';

// 创建新的标签
let create = (data) => axios.post('/tag/', data);

// 删除标签,delete是js中内置语法，不能用delete命名
let remove = (id, params) => axios.delete(`/tag/${id}`, { params });

// 编辑标签：模板字符串的拼接
let edit = (tag_id, data) => axios.put(`/tag/${tag_id}`, data);

// 获取标签列表
let list = (params) => axios.get('/tag/list', { params });

export default {
	create,
	remove,
	edit,
	list,
}
